package longtime;

import java.util.Scanner;

public class demo07 {
    public static void main(String[] args) {
        System.out.println("请输入用户名");
        Scanner sc = new Scanner(System.in);
        int name = sc.nextInt();
        System.out.println("====================");
        if (name == 123){
            System.out.println("请输入密码");
            int password = sc.nextInt();
            if (password == 123){
                System.out.println("登陆成功");
            }else{
                System.out.println("密码错误，还剩3次机会，请重新输入");
            }
        }else {
            System.out.println("用户名不存在，请重新输入");
        }
    }
}
